package cn.jinbyte.data.service;

import java.time.Duration;
import java.util.concurrent.TimeUnit;

/**
 * 缓存服务接口
 *
 * @author jintingying
 * @date 2025/4/9
 * @since 1.0
 */
public interface CacheService<V> {

    void set(final String key, final V value);

    void set(final String key, final V value, final long timeout, final TimeUnit timeUnit);

    void expire(final String key, final Duration timeout);

    V get(final String key);

    void del(final String key);
}
